rm(list = ls())
require(foreign)
require(readstata13)
require(readxl)

setwd("C:\\Users\\aaron.phipps\\OneDrive - West Point\\Projects\\Live Projects\\No threat time\\")
input_directory = "C:\\Users\\aaron.phipps\\OneDrive - West Point\\Projects\\Live Projects\\No threat time\\build\\input\\basefiles"
local_data_directory = "C:\\Users\\aaron.phipps\\OneDrive - West Point\\Projects\\Live Projects\\No threat time"

base_file = read.dta13(paste(input_directory,"\\(B2) Observation Panel 2010 to 2018 (2019-02-12).dta", sep=''))
school_base_file = read.dta13(paste(input_directory,"\\(B1) Teacher Panel 2010 to 2016 (2017-12-08).dta", sep=''))

input_gdrive = "C:\\Users\\aaron.phipps\\OneDrive - West Point\\Projects\\Live Projects\\No threat time\\build\\input\\"
image_output = "C:\\Users\\aaron.phipps\\OneDrive - West Point\\Projects\\Live Projects\\No threat time\\analysis\\output\\Figures"

source("C:\\Users\\aaron.phipps\\OneDrive - West Point\\Projects\\Live Projects\\No threat time\\build\\code_Version05\\function_create_data.R")
source("C:\\Users\\aaron.phipps\\OneDrive - West Point\\Projects\\Live Projects\\No threat time\\build\\code_Version05\\function_calculate_hazard.R")
for(year in c(2010,2011,2012))
{
	create_threat_data(year, base_file)
}
